package me.exchange.com.modules.system.repository;

import me.exchange.com.modules.system.domain.UrlConfig;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
* @author zjj
* @date 2020-05-04
*/
public interface UrlConfigRepository extends JpaRepository<UrlConfig, Long>, JpaSpecificationExecutor<UrlConfig> {

    @Modifying
    @Query(value = "select * from sys_url_config where is_push='1' order by create_time desc ",nativeQuery = true)
    List<UrlConfig> findAllOrderBy();
}